package com.ibuonline.b2b.entity;

import java.io.Serializable;

import com.ibuonline.b2b.common.enumeration.ProductOperation;
import com.ibuonline.b2b.common.enumeration.ProductOperatorType;

public class ProdLog implements Serializable {

	private static final long serialVersionUID = 7675747794619852688L;

	//fields
	private java.lang.Long id;
	private java.lang.Long prodId;
	private java.lang.Integer companyId;
	private ProductOperation operation;
	private java.sql.Timestamp operateTime;
	private ProductOperatorType operatorType;
	private java.lang.Integer operatorId;

	//default constructor
	public ProdLog() {
	}

	//getter
	public java.lang.Long getId() {
		return id;
	}
	public java.lang.Long getProdId() {
		return prodId;
	}
	public java.lang.Integer getCompanyId() {
		return companyId;
	}
	public ProductOperation getOperation() {
		return operation;
	}
	public java.sql.Timestamp getOperateTime() {
		return operateTime;
	}
	public ProductOperatorType getOperatorType() {
		return operatorType;
	}
	public java.lang.Integer getOperatorId() {
		return operatorId;
	}

	//setter
	public void setId(java.lang.Long id) {
		this.id = id;
	}
	public void setProdId(java.lang.Long prodId) {
		this.prodId = prodId;
	}
	public void setCompanyId(java.lang.Integer companyId) {
		this.companyId = companyId;
	}
	public void setOperation(ProductOperation operation) {
		this.operation = operation;
	}
	public void setOperateTime(java.sql.Timestamp operateTime) {
		this.operateTime = operateTime;
	}
	public void setOperatorType(ProductOperatorType operatorType) {
		this.operatorType = operatorType;
	}
	public void setOperatorId(java.lang.Integer operatorId) {
		this.operatorId = operatorId;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof ProdLog))
			return false;

		final ProdLog prodLog = (ProdLog)other;
		if (!this.id.equals(prodLog.getId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(id).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("ProdLog[")
			.append("id=").append(id).append(", ")
			.append("prodId=").append(prodId).append(", ")
			.append("companyId=").append(companyId).append(", ")
			.append("operation=").append(operation).append(", ")
			.append("operateTime=").append(operateTime).append(", ")
			.append("operatorType=").append(operatorType).append(", ")
			.append("operatorId=").append(operatorId).append("]").toString();
	}
}